<script setup>
import {ref} from "vue";
import {useRouter} from "vue-router";

const groupName = ref('')
const userName = ref('')
const gender = ref('')
const Data3 =[
  {
    id:1,
    ID:123,
    groupName: '武汉市第一中学',
    Groupleader:'武汉一中',
    leader:'是',
    area: '郝涛',
    name:'林刚',
    title:'教导主任',
    number:'17746641318',
    hometown:'740最新',
    graduation:'2',
  },
  {
    id:1,
    ID:123,
    groupName: '武汉市第一中学',
    Groupleader:'武汉一中',
    leader:'是',
    area: '郝涛',
    name:'林刚',
    title:'教导主任',
    number:'17746641318',
    hometown:'740最新',
    graduation:'2',

  },
  {
    id:1,
    ID:123,
    groupName: '武汉市第一中学',
    Groupleader:'武汉一中',
    leader:'是',
    area: '郝涛',
    name:'林刚',
    title:'教导主任',
    number:'17746641318',
    hometown:'740最新',
    graduation:'2',

  },
  {
    id:1,
    ID:123,
    groupName: '武汉市第一中学',
    Groupleader:'武汉一中',
    leader:'是',
    area: '郝涛',
    name:'林刚',
    title:'教导主任',
    number:'17746641318',
    hometown:'740最新',
    graduation:'2',
  },
  {
    id:1,
    ID:123,
    groupName: '武汉市第一中学',
    Groupleader:'武汉一中',
    leader:'是',
    area: '郝涛',
    name:'林刚',
    title:'教导主任',
    number:'17746641318',
    hometown:'740最新',
    graduation:'2',
  },

]

const router = useRouter()
const Click=()=>{
  router.push('/middleshow/list')
}
function resetParams(){
  groupName.value = ''
  gender.value = ''
  userName.value = ''
}
</script>
<!-- 搜索表单1 -->
<template>
  <el-card class="page-container">
    <template #header>
      <div class="header">
        <span>中学管理</span>
      </div>
    </template>
  <el-form inline>
    <el-form-item >
      <el-input v-model="groupName" placeholder="请输入招宣组名字查询" style="width: 150px"></el-input>
    </el-form-item>
    <el-form-item >
      <el-select placeholder="请选择负责区域" v-model="gender" style="width: 150px">
        <el-option label="A区域" value="a"></el-option>
        <el-option label="B区域" value="b"></el-option>
      </el-select>
    </el-form-item>
    <el-form-item >
      <el-input v-model="userName" placeholder="请输入姓名查询" style="width: 150px"></el-input>
    </el-form-item>
    <el-form-item >
      <el-button type="primary" @click="getUserList">搜索</el-button>
      <el-button @click="resetParams">重置 </el-button>
    </el-form-item>
    <el-form-item style="float:right;">
      <el-button class="button1" type="primary" @click="showAddDialog">导入成员招宣组</el-button>
      <el-button class="button2" type="primary" @click="showAddDialog('添加招宣组')">添加招宣组</el-button>
    </el-form-item>
  </el-form>
  <!-- 文章列表 -->
  <el-table :data="Data3" style="width: 100%">
    <el-table-column type="index" label="序号" width="55" />
    <el-table-column label="校徽" width="55" prop="ID"></el-table-column>
    <el-table-column label="中学名称" width="125" prop="groupName"></el-table-column>
    <el-table-column label="中学别称" prop="Groupleader"></el-table-column>
    <el-table-column label="是否优质生源地" width="80" prop="leader"></el-table-column>
    <el-table-column label="招宣人员(武理筑梦人)" width="80" prop="area"></el-table-column>
    <el-table-column label="中学联系人" width="70" prop="name"></el-table-column>
    <el-table-column label="中学联系人职务" prop="title"></el-table-column>
    <el-table-column label="联系电话" prop="number"></el-table-column>
    <el-table-column label="录取数据" prop="hometown"></el-table-column>
    <el-table-column label="关联招宣活动" prop="graduation"></el-table-column>
    <el-table-column label="操作" width="200">
      <template #default="{ row }">
        <el-button   type="primary" @click="Click">查看</el-button>
        <el-button   type="primary" @click="Click">更多</el-button>
      </template>
    </el-table-column>
    <template #empty>
      <el-empty description="没有数据"/>
    </template>
  </el-table>
  <!-- 分页条 -->
  <div class="example-pagination-block">
    <el-pagination layout="prev, pager, next" :total="50" />
  </div>
  </el-card>
</template>

<style scoped lang="scss">
    .button1{
      width: 151px;
      height: 36px;
      border-radius: 5px;
      background: #fff;
      border: 1px solid #236cff;
      font-family: "Source Han Sans CN";
      font-weight: 400;
      font-size: 14px;
      text-align: left;
      color: #236cff;
    }
    .button2{
      width: 138px;
      height: 36px;
      border-radius: 5px;
      background: linear-gradient(130.33deg, #31efed 0%, #236cff 100%);
    }
    .example-pagination-block {
      margin-top: 150px;
      float: right;
      margin-bottom: 16px;
    }
</style>
